package com.wnxy.mallserver.service.impl;

import com.wnxy.mallserver.entity.Address;
import com.wnxy.mallserver.mapper.AddressMapper;
import com.wnxy.mallserver.service.AddressService;
import com.wnxy.mallserver.vo.PccVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {
    @Resource
    private AddressMapper addressMapper;
    @Override
    public List<Address> findArrByUid(int uid) {
        return addressMapper.findArrByUid(uid);
    }

    @Override
    public List<PccVo> getPccList() {
        return addressMapper.getPccList();
    }

    //添加地址
    @Override
    public Integer submitAddr(Address address) {
        addressMapper.submitAddr(address);
        return address.getId();
    }

    @Override
    public Address findByAid(Integer aid) {
        return addressMapper.findByAid(aid);
    }
}
